<template>
     <view>
          
        <NavBar :navItems="myNavItems" :fontSize="26" :dynamicHeight="4" :indicatorWidth="30"
            @item-selected="onItemSelected" />
           <!-- 其他页面内容 -->
        
    </view>
</template>

<script>
import NavBar from './xztdemoNavBar.vue'

export default {
    components: {
        NavBar
    },
    data() {
        return {
            myNavItems: ['首页', '北京同仁堂', '正官庄', '仙芝楼', '江中', 'swisses', '品牌馆'],
            // myNavItems: ['首页', '分类', '购物车', '我的']
        }
    },
    methods: {
        onItemSelected(index) {
            console.log('Selected item index:', index)
            // 处理选中项的逻辑
        }
    }
}
</script>